//
//  BaseServiceManager.h
//  IMDome
//
//  Created by limaohuyu on 2020/8/13.
//  Copyright © 2020 czw. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"
#import "ResponseBaseModel.h"


NS_ASSUME_NONNULL_BEGIN

typedef void (^VoidBlock)(void);
typedef void (^SuccessBlock)(ResponseBaseModel *responseModel);
typedef void (^FailureBlock)(NSError *error,NSString *msg);

@interface BaseServiceManager : NSObject
+ (AFHTTPSessionManager *)createSessionManager;

+(void)postRequest:(NSString *)postUrl
            params:(NSDictionary*)params
        startBlock:(VoidBlock)startBlock
      successBlock:(SuccessBlock)successBlock
      failureBlock:(FailureBlock)failureBlock;


+(void)getRequest:(NSString *)getUrl
           params:(NSDictionary*)params
       startBlock:(VoidBlock)startBlock
     successBlock:(SuccessBlock )successBlock
     failureBlock:(FailureBlock)failureBlock;
@end

NS_ASSUME_NONNULL_END
